package cn.getech.data.development.service;

import cn.getech.data.development.entity.TableFieldMaskRules;
import cn.getech.data.development.model.dto.TableFieldInfoDto;
import cn.getech.data.development.model.dto.TableFieldMaskRulesDto;
import cn.getech.data.development.model.dto.TableInfoDto;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hujz
 * @since 2020-02-19
 */
public interface ITableFieldMaskRulesService extends IService<TableFieldMaskRules> {

    /***
     * 根据表id查询到未配置脱敏规则的字段集合
     * @param  id 表id
     * @return
     */
    List<TableFieldInfoDto> listNotDataMaskingField(Integer id);

    TableInfoDto getByTableId(Integer id);

    /***
     * 根据表id查询到都有的配置的脱敏规则字段信息
     * @param id 表id
     * @return
     */
    List<TableFieldMaskRulesDto> listDataMaskingField(Integer id,Integer tenantId);

    void deleteById(Integer id);

    void saveTableMaskOpen(TableInfoDto tableInfoDto);

    TableFieldMaskRules saveTableFieldRules(TableFieldMaskRulesDto tableFieldMaskRulesDto);

    void updateTableFieldRules(TableFieldMaskRulesDto tableFieldMaskRulesDto);
}
